<!DOCTYPE html><html><head><title>business.md</title><meta charset='utf-8'><link href='https://dn-maxiang.qbox.me/res-min/themes/marxico.css' rel='stylesheet'><style></style></head><body><div id='preview-contents' class='note-content'>
                        <div id="wmd-preview" class="preview-content"></div>
                    <div id="wmd-preview-section-35" class="wmd-preview-section preview-content">

<p>目录:</p>

<div><div class="toc"><div class="toc">
<ul>
<li><ul>
<li><ul>
<li><ul>
<li><a href="#businessmd">business.md</a></li>
<li><a href="#物品托管及后台配置">物品托管及后台配置</a></li>
<li><a href="#商城兑换及支付">商城兑换及支付</a></li>
<li><a href="#场次与机器人">场次与机器人</a></li>
<li><a href="#线下同步">线下同步</a></li>
<li><a href="#首次登录奖励">首次登录奖励</a></li>
<li><a href="#服务器自定义存储">服务器自定义存储</a></li>
<li><a href="#获取用户对战信息">获取用户对战信息</a></li>
<li><a href="#排行榜">排行榜</a></li>
<li><a href="#签到">签到</a></li>
<li><a href="#任务成就奖励奖品发放">任务成就奖励,奖品发放.</a></li>
<li><a href="#批量获取用户信息">批量获取用户信息</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>

<hr>

</div><div id="wmd-preview-section-36" class="wmd-preview-section preview-content">

<h4 id="businessmd">business.md</h4>

<p>v1.00.000</p>

<ol><li rel="1">金币与商品托管，包括配置，支付产生，消耗，兑换。</li>
<li rel="2">发放奖励。</li>
<li rel="3">线下同步。</li>
<li rel="4">场次。</li>
<li rel="5">机器人。   </li>
</ol>

<p>v1.01.000</p>

<ol><li rel="1">排行榜</li>
<li rel="2">签到</li>
<li rel="3">任务</li>
<li rel="4">成就</li>
</ol>

<p>接口项目地址 :  <br>
<strong>Cocos2dx</strong>: <a href="http://git.oschina.net/matchvs/API-Cocos2dx" target="_blank">http://git.oschina.net/matchvs/API-Cocos2dx</a> <br>
<strong>Unity3D</strong>: <a href="http://git.oschina.net/matchvs/API-Unity3D" target="_blank">http://git.oschina.net/matchvs/API-Unity3D</a></p>

</div><div id="wmd-preview-section-37" class="wmd-preview-section preview-content">

<h4 id="物品托管及后台配置">物品托管及后台配置</h4>

<p>货币、钻石、道具等内容在MatchVS中定义为物品，开发者只需要配置好物品价值及信息，在其他需要使用到物品（如商城兑换、商品交易、奖励发放）的地方调用。</p>

<p>提交物品清单邮件发给 <strong>MatchVS</strong>  (shiyunlong@kobox.tv)</p>

<table>
<thead>
<tr>
  <th>名称</th>
  <th>单价 （钻分为单位，1钻分=0.01RMB）</th>
</tr>
</thead>
<tbody><tr>
  <td>金币</td>
  <td>1</td>
</tr>
</tbody></table>


<p>matchvs会返回物品ID,  如：</p>

<table>
<thead>
<tr>
  <th>名称</th>
  <th>物品ID</th>
</tr>
</thead>
<tbody><tr>
  <td>金币</td>
  <td>129</td>
</tr>
</tbody></table>


<p>表格示例</p>

</div><div id="wmd-preview-section-38" class="wmd-preview-section preview-content">

<p><img longdesc="./1468838450264.png" alt="Alt text" title="" type="image/png" src="" class=""></p>

</div><div id="wmd-preview-section-39" class="wmd-preview-section preview-content">

<h4 id="商城兑换及支付">商城兑换及支付</h4>

<p>1.商城商品配置 <br>
邮件包含如下信息</p>

<table>
<thead>
<tr>
  <th>信息</th>
  <th>备注</th>
</tr>
</thead>
<tbody><tr>
  <td>商品名称</td>
  <td>比如 “2000金币”</td>
</tr>
<tr>
  <td>商品图片</td>
  <td>图片</td>
</tr>
<tr>
  <td>商品描述文字</td>
  <td>比如 “系统赠送的金币，很珍贵”</td>
</tr>
<tr>
  <td>商品中包含</td>
  <td>的物品及数量   ID+Count， 可以有多项</td>
</tr>
<tr>
  <td>商品价格</td>
  <td>以钻分为单位</td>
</tr>
</tbody></table>


<p>需要配置项   (邮件发给<a href="http://shiyunlong@kobox.tv" target="_blank">MatchVS</a>)</p>

<p>MatchVS返回商品ID，比如 12</p>

<p>2.商品购买 <br>
代码范例：</p>

</div><div id="wmd-preview-section-40" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs lasso">CMatchVSPayChargeOrder   <span class="hljs-keyword">order</span>;<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strOpenOrderID<span class="hljs-built_in">.</span>i32Size =  sizeof(<span class="hljs-string">"order"</span>);<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strOpenOrderID<span class="hljs-built_in">.</span>pData = <span class="hljs-string">"order"</span>;<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strOpenExtend<span class="hljs-built_in">.</span>i32Size = sizeof(<span class="hljs-string">"order"</span>);<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strOpenExtend<span class="hljs-built_in">.</span>pData = <span class="hljs-string">"order"</span>;<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strDescription<span class="hljs-built_in">.</span>i32Size = sizeof(<span class="hljs-string">"buy 2000"</span>);<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strDescription<span class="hljs-built_in">.</span>pData = <span class="hljs-string">"buy 2000"</span>;<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strSubject<span class="hljs-built_in">.</span>i32Size = sizeof(<span class="hljs-string">"buy 2000"</span>);<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strSubject<span class="hljs-built_in">.</span>pData = <span class="hljs-string">"buy 2000"</span>;<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strOpenExtend<span class="hljs-built_in">.</span>pData = <span class="hljs-string">"orderID"</span>;<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strOpenExtend<span class="hljs-built_in">.</span>i32Size = sizeof(<span class="hljs-string">"orderID"</span>);<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strOpenNotifyUrl<span class="hljs-built_in">.</span>i32Size = sizeof(<span class="hljs-string">"http://open.matchvs.com/wc4/sendCP.do"</span>);<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strOpenNotifyUrl<span class="hljs-built_in">.</span>pData = <span class="hljs-string">"http://open.matchvs.com/wc4/sendCP.do"</span>;<br><br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strOpenExtend<span class="hljs-built_in">.</span>i32Size = sizeof(<span class="hljs-string">"{"</span>goodsID<span class="hljs-string">":12}"</span>);<br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>strOpenExtend<span class="hljs-built_in">.</span>pData = <span class="hljs-string">"{"</span>goodsID<span class="hljs-string">":12}"</span>;<br><br><span class="hljs-keyword">order</span><span class="hljs-built_in">.</span>i32Needpend = <span class="hljs-number">1</span><br><br>CMatchVSPay<span class="hljs-tag">::getInstance</span>()<span class="hljs-subst">-&gt;</span>pay(<span class="hljs-subst">&amp;</span><span class="hljs-keyword">order</span>);<br></code></pre>

</div><div id="wmd-preview-section-41" class="wmd-preview-section preview-content">

<h4 id="场次与机器人">场次与机器人</h4>

<p>1.配置 <br>
发邮件，包含场次信息</p>

<table>
<thead>
<tr>
  <th>信息</th>
  <th>备注</th>
</tr>
</thead>
<tbody><tr>
  <td>场次名</td>
  <td>比如 “初级场”</td>
</tr>
<tr>
  <td>图片</td>
  <td></td>
</tr>
<tr>
  <td>场次描述</td>
  <td>比如 “初级场-免费 新手”</td>
</tr>
<tr>
  <td>门槛</td>
  <td>ID+Count， 可以有多项</td>
</tr>
<tr>
  <td>消耗</td>
  <td>进场消耗</td>
</tr>
<tr>
  <td>胜负平奖励处理规则</td>
  <td></td>
</tr>
<tr>
  <td>是否支持机器人</td>
  <td></td>
</tr>
<tr>
  <td>机器人等待匹配时间</td>
  <td></td>
</tr>
</tbody></table>


<p>返回场次ID， 比如13</p>

<p>配置示例:</p>

</div><div id="wmd-preview-section-42" class="wmd-preview-section preview-content">

<p><img longdesc="./1468838556821.png" alt="Alt text" title="" type="image/png" src="" class=""></p>

<p>2.查询场次信息接口 <br>
Http::battleFields <br>
场次信息包含上述表单中的配置内容（场次名、场次ID、门槛、消耗） <br>
示例 <br>
<a href="http://testopen.matchvs.com/wc3/getBattleFields.do?gameID=100011&amp;versionID=1" target="_blank">http://testopen.matchvs.com/wc3/getBattleFields.do?gameID=100011&amp;versionID=1</a> <br>
成功返回</p>

<p>信息字段：</p>

<table>
<thead>
<tr>
  <th>字段</th>
  <th>含义</th>
  <th>类型</th>
</tr>
</thead>
<tbody><tr>
  <td>fieldID</td>
  <td>场次ID</td>
  <td>int</td>
</tr>
<tr>
  <td>gameID</td>
  <td>游戏ID</td>
  <td>int</td>
</tr>
<tr>
  <td>fieldName</td>
  <td>场次名字</td>
  <td>string</td>
</tr>
<tr>
  <td>status</td>
  <td>状态 1启用 2关闭</td>
  <td>int</td>
</tr>
<tr>
  <td>fieldCover</td>
  <td>场次图</td>
  <td>string</td>
</tr>
<tr>
  <td>dateStart</td>
  <td>开始使用日期</td>
  <td>0000-00-00</td>
</tr>
<tr>
  <td>dateEnd</td>
  <td>到期日期</td>
  <td>0000-00-00</td>
</tr>
<tr>
  <td>thresholds</td>
  <td>门槛列表</td>
  <td>列表</td>
</tr>
<tr>
  <td>cost</td>
  <td>花费列表    列表</td>
  <td></td>
</tr>
</tbody></table>


<p>thresholds:</p>

<table>
<thead>
<tr>
  <th>字段</th>
  <th>含义</th>
  <th>类型</th>
</tr>
</thead>
<tbody><tr>
  <td>gameID</td>
  <td>游戏ID</td>
  <td>int</td>
</tr>
<tr>
  <td>maxCount</td>
  <td>超过多少不能进</td>
  <td>int</td>
</tr>
<tr>
  <td>minCount</td>
  <td>小于多少不能进</td>
  <td>int</td>
</tr>
<tr>
  <td>productID</td>
  <td>商品ID</td>
  <td>int</td>
</tr>
</tbody></table>


<p>cost:</p>

<table>
<thead>
<tr>
  <th>字段</th>
  <th>含义</th>
  <th>类型</th>
</tr>
</thead>
<tbody><tr>
  <td>commission</td>
  <td>单局抽水个数</td>
  <td>int</td>
</tr>
<tr>
  <td>count</td>
  <td>单局消耗个数</td>
  <td>int</td>
</tr>
<tr>
  <td>gameID</td>
  <td>游戏ID</td>
  <td>int</td>
</tr>
<tr>
  <td>productID</td>
  <td>商品ID</td>
  <td>int</td>
</tr>
</tbody></table>


<p>示例数据:</p>

</div><div id="wmd-preview-section-43" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs cpp">{<br>    <span class="hljs-string">"code"</span>: <span class="hljs-number">0</span>,<br>    <span class="hljs-string">"data"</span>: [{<br>            <span class="hljs-string">"cost"</span>: [{<br>                    <span class="hljs-string">"commission"</span>:   <span class="hljs-number">10</span>,<br>                    <span class="hljs-string">"count"</span>:    <span class="hljs-number">100</span>,<br>                    <span class="hljs-string">"gameID"</span>:   <span class="hljs-number">100011</span>,<br>                    <span class="hljs-string">"productID"</span>:    <span class="hljs-number">101</span><br>                }],<br>            <span class="hljs-string">"dateEnd"</span>:  <span class="hljs-string">"2999-12-31"</span>,<br>            <span class="hljs-string">"dateStart"</span>:    <span class="hljs-string">"0000-00-00"</span>,<br>            <span class="hljs-string">"fieldCover"</span>:   <span class="hljs-string">"http://emres.vszone.cn/lobby/field/cover.100011.5.1.png"</span>,<br>            <span class="hljs-string">"fieldID"</span>:  <span class="hljs-number">1</span>,<br>            <span class="hljs-string">"fieldName"</span>:    <span class="hljs-string">"新手场"</span>,<br>            <span class="hljs-string">"gameID"</span>:   <span class="hljs-number">100011</span>,<br>            <span class="hljs-string">"status"</span>:   <span class="hljs-number">1</span>,<br>            <span class="hljs-string">"thresholds"</span>:   [{<br>                    <span class="hljs-string">"gameID"</span>:   <span class="hljs-number">100011</span>,<br>                    <span class="hljs-string">"maxCount"</span>: <span class="hljs-number">5000</span>,<br>                    <span class="hljs-string">"minCount"</span>: <span class="hljs-number">100</span>,<br>                    <span class="hljs-string">"productID"</span>:    <span class="hljs-number">101</span><br>                }],<br>            <span class="hljs-string">"timeEnd"</span>:  <span class="hljs-string">"23:59:59"</span>,<br>            <span class="hljs-string">"timeStart"</span>:    <span class="hljs-string">"00:00:00"</span><br>        }, {<br>            <span class="hljs-string">"cost"</span>: [{<br>                    <span class="hljs-string">"commission"</span>:   <span class="hljs-number">50</span>,<br>                    <span class="hljs-string">"count"</span>:    <span class="hljs-number">500</span>,<br>                    <span class="hljs-string">"gameID"</span>:   <span class="hljs-number">100011</span>,<br>                    <span class="hljs-string">"productID"</span>:    <span class="hljs-number">101</span><br>                }],<br>            <span class="hljs-string">"dateEnd"</span>:  <span class="hljs-string">"2999-12-31"</span>,<br>            <span class="hljs-string">"dateStart"</span>:    <span class="hljs-string">"0000-00-00"</span>,<br>            <span class="hljs-string">"fieldCover"</span>:   <span class="hljs-string">"http://emres.vszone.cn/lobby/field/cover.100011.5.2.png"</span>,<br>            <span class="hljs-string">"fieldID"</span>:  <span class="hljs-number">2</span>,<br>            <span class="hljs-string">"fieldName"</span>:    <span class="hljs-string">"初级场"</span>,<br>            <span class="hljs-string">"gameID"</span>:   <span class="hljs-number">100011</span>,<br>            <span class="hljs-string">"status"</span>:   <span class="hljs-number">1</span>,<br>            <span class="hljs-string">"thresholds"</span>:   [{<br>                    <span class="hljs-string">"gameID"</span>:   <span class="hljs-number">100011</span>,<br>                    <span class="hljs-string">"maxCount"</span>: <span class="hljs-number">0</span>,<br>                    <span class="hljs-string">"minCount"</span>: <span class="hljs-number">500</span>,<br>                    <span class="hljs-string">"productID"</span>:    <span class="hljs-number">101</span><br>                }],<br>            <span class="hljs-string">"timeEnd"</span>:  <span class="hljs-string">"23:59:59"</span>,<br>            <span class="hljs-string">"timeStart"</span>:    <span class="hljs-string">"00:00:00"</span><br>        }, {<br>            <span class="hljs-string">"cost"</span>: [{<br>                    <span class="hljs-string">"commission"</span>:   <span class="hljs-number">100</span>,<br>                    <span class="hljs-string">"count"</span>:    <span class="hljs-number">1000</span>,<br>                    <span class="hljs-string">"gameID"</span>:   <span class="hljs-number">100011</span>,<br>                    <span class="hljs-string">"productID"</span>:    <span class="hljs-number">101</span><br>                }],<br>            <span class="hljs-string">"dateEnd"</span>:  <span class="hljs-string">"2999-12-31"</span>,<br>            <span class="hljs-string">"dateStart"</span>:    <span class="hljs-string">"0000-00-00"</span>,<br>            <span class="hljs-string">"fieldCover"</span>:   <span class="hljs-string">"http://emres.vszone.cn/lobby/field/cover.100011.2.png"</span>,<br>            <span class="hljs-string">"fieldID"</span>:  <span class="hljs-number">3</span>,<br>            <span class="hljs-string">"fieldName"</span>:    <span class="hljs-string">"高级场"</span>,<br>            <span class="hljs-string">"gameID"</span>:   <span class="hljs-number">100011</span>,<br>            <span class="hljs-string">"status"</span>:   <span class="hljs-number">0</span>,<br>            <span class="hljs-string">"thresholds"</span>:   [{<br>                    <span class="hljs-string">"gameID"</span>:   <span class="hljs-number">100011</span>,<br>                    <span class="hljs-string">"maxCount"</span>: <span class="hljs-number">0</span>,<br>                    <span class="hljs-string">"minCount"</span>: <span class="hljs-number">1000</span>,<br>                    <span class="hljs-string">"productID"</span>:    <span class="hljs-number">101</span><br>                }],<br>            <span class="hljs-string">"timeEnd"</span>:  <span class="hljs-string">"23:59:59"</span>,<br>            <span class="hljs-string">"timeStart"</span>:    <span class="hljs-string">"00:00:00"</span><br>        }],<br>    <span class="hljs-string">"msg"</span>:  <span class="hljs-string">"success"</span>,<br>    <span class="hljs-string">"status"</span>:   <span class="hljs-number">0</span><br>}'<br></code></pre>

<p>3.进某场次的房间</p>

</div><div id="wmd-preview-section-44" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs stylus">CMatchVSLobby::<span class="hljs-function"><span class="hljs-title">getInstance</span><span class="hljs-params">()</span></span>-&gt;<span class="hljs-function"><span class="hljs-title">roomInWithField</span><span class="hljs-params">(<span class="hljs-number">13</span>)</span></span><br></code></pre>

<p>参数来源为：查询场次信息接口的返回值。</p>

<p>4.机器人</p>

<p>当场时间匹配不到真人玩家时,可通过配置机器人来充当玩家. <br>
配置示例:</p>

</div><div id="wmd-preview-section-45" class="wmd-preview-section preview-content">

<p><img longdesc="./1468839855421.png" alt="Alt text" title="" type="image/png" src="" class=""></p>

<p>匹配到机器人通知:</p>

</div><div id="wmd-preview-section-46" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="language-c++ hljs cpp">CMatchVSLobbyCallback::onRoomChangeExt(MatchVSRoomStatusExt *pRoomStateExt);<br></code></pre>

<p>其中 <br>
MatchVSRoomStatusExt::i32IsRobert 为1是该用户为机器人</p>

</div><div id="wmd-preview-section-47" class="wmd-preview-section preview-content">

<h4 id="线下同步">线下同步</h4>

<p>1.规则 <br>
 对于之前已经有的线上金币，托管前需要同步至线上，且只能同步一次。 <br>
2.发现未同步过 <br>
方式: CMatchVSPay::getMyPacket 查询我的背包 <br>
识别: CMatchVSPayCallback::onGotMyPacket 返回列表中无此商品项为没有同步过 <br>
3.同步接口 <br>
Http::offlineSyncProduct <br>
示例</p>

</div><div id="wmd-preview-section-48" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs fortran">http://testpay.matchvs.com/wc4/offlineSyncProduct.<span class="hljs-keyword">do</span>?<span class="hljs-built_in">count</span>=<span class="hljs-number">100</span>&amp;gameID=<span class="hljs-number">102000</span>&amp;productID=<span class="hljs-number">100</span>&amp;userID=<span class="hljs-number">32</span>&amp;<span class="hljs-built_in">sign</span>=a7c87bbe944b7adeb423a2227e6667ca<br></code></pre>

<p>返回</p>

</div><div id="wmd-preview-section-49" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs json">{"<span class="hljs-attribute">code</span>":<span class="hljs-value"><span class="hljs-number">200</span></span>,"<span class="hljs-attribute">msg</span>":<span class="hljs-value"><span class="hljs-string">"已同步过"</span></span>,"<span class="hljs-attribute">status</span>":<span class="hljs-value"><span class="hljs-number">1</span></span>}<br></code></pre>

<p>成功返回json</p>

<table>
<thead>
<tr>
  <th>字段</th>
  <th>意义</th>
</tr>
</thead>
<tbody><tr>
  <td>productID</td>
  <td>商品ID</td>
</tr>
<tr>
  <td>count</td>
  <td>个数</td>
</tr>
</tbody></table>


<p>失败返回(已同步)</p>

</div><div id="wmd-preview-section-50" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs json">{<br>    "<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">200</span></span>,<br>    "<span class="hljs-attribute">msg</span>":  <span class="hljs-value"><span class="hljs-string">"已同步过"</span></span>,<br>    "<span class="hljs-attribute">status</span>":   <span class="hljs-value"><span class="hljs-number">1</span><br></span>}<br></code></pre>

<p>4.设置 <br>
需要发邮件给matchvs后台配置哪些商品允许同步发放。</p>

</div><div id="wmd-preview-section-51" class="wmd-preview-section preview-content">

<h4 id="首次登录奖励">首次登录奖励</h4>

<p>1.目的 <br>
给初始化用户奖励金币</p>

<p>2.配置 <br>
发邮件通知设置后台设置哪些商品在初始化时需要奖励及数量</p>

<p>如：</p>

<table>
<thead>
<tr>
  <th>商品名称</th>
  <th>商品ID</th>
  <th>商品数量</th>
</tr>
</thead>
<tbody><tr>
  <td>金币</td>
  <td>129</td>
  <td>1000</td>
</tr>
</tbody></table>


<p>注：可发送多种。</p>

<p>配置示例:</p>

</div><div id="wmd-preview-section-52" class="wmd-preview-section preview-content">

<p><img longdesc="./1468838703605.png" alt="Alt text" title="" type="image/png" src="" class=""></p>

<p>3.接口 <br>
Http::loginSubsidy</p>

<p>示例:</p>

</div><div id="wmd-preview-section-53" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs dns">http://testpay.matchvs.com/wc4/signSubsidy.do?gameID=102000&amp;userID=32&amp;sign=c9142bcabc<span class="hljs-number">48628b06</span>dba<span class="hljs-number">444532c7</span>e7f<br></code></pre>

<p>成功返回json</p>

<table>
<thead>
<tr>
  <th>参数</th>
  <th>说明</th>
</tr>
</thead>
<tbody><tr>
  <td>gameID</td>
  <td></td>
</tr>
<tr>
  <td>productID</td>
  <td></td>
</tr>
<tr>
  <td>type</td>
  <td>商品的类型</td>
</tr>
<tr>
  <td>count</td>
  <td>年（subsidytype为0是才有效）</td>
</tr>
<tr>
  <td>month</td>
  <td>月（subsidytype为0是才有效）</td>
</tr>
<tr>
  <td>day</td>
  <td>日（subsidytype为0是才有效）</td>
</tr>
<tr>
  <td>runningdays</td>
  <td>subsidytype类型为1表示连续天数，类型为2表示周签到次数 类型为5表示周日期</td>
</tr>
<tr>
  <td>subsidytype</td>
  <td>奖励方式类型 0:每天奖励 1:连续N天奖励 2:周循环 3:首次登陆奖励  4日期奖励  5周日期奖励</td>
</tr>
</tbody></table>


<p>失败(未配置)返回</p>

</div><div id="wmd-preview-section-54" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs json">{<br>    "<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">7001</span></span>,<br>    "<span class="hljs-attribute">msg</span>":  <span class="hljs-value"><span class="hljs-string">"There is no login-subsidy for this game in 2016-07-13"</span></span>,<br>    "<span class="hljs-attribute">status</span>":   <span class="hljs-value"><span class="hljs-number">1</span><br></span>}<br></code></pre>

</div><div id="wmd-preview-section-55" class="wmd-preview-section preview-content">

<h4 id="服务器自定义存储">服务器自定义存储</h4>

<p>1.目的 <br>
服务器自定义存储字符串数据</p>

<p>2.配置 <br>
    无需配置 <br>
3.接口 <br>
存储数据,(key-value)形式 <br>
Http:: hashSet</p>

</div><div id="wmd-preview-section-56" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs fortran">http://testopen.matchvs.com/wc5/hashSet.<span class="hljs-keyword">do</span>?gameID=<span class="hljs-number">102000</span>&amp;key=<span class="hljs-number">888</span>&amp;userID=<span class="hljs-number">32</span>&amp;<span class="hljs-keyword">value</span>=88b&amp;<span class="hljs-built_in">sign</span>=ee70080ee988ce6fb1b6b6b935299a1<br></code></pre>

<p>成功返回</p>

</div><div id="wmd-preview-section-57" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs json">{<br>    "<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">0</span></span>,<br>    "<span class="hljs-attribute">data</span>": <span class="hljs-value"><span class="hljs-string">"success"</span></span>,<br>    "<span class="hljs-attribute">status</span>":   <span class="hljs-value"><span class="hljs-number">0</span><br></span>}<br></code></pre>

<p>通过key读取数据 <br>
Http:: hashGet</p>

</div><div id="wmd-preview-section-58" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs elixir"><span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/testopen.matchvs.com/wc</span>5/hashGet.<span class="hljs-keyword">do</span>?gameID=<span class="hljs-number">102000</span>&amp;key=<span class="hljs-number">888</span>&amp;userID=<span class="hljs-number">32</span>&amp;sign=bb34638da59051aec80102eef25ddb7<span class="hljs-number">0</span><br></code></pre>

<p>成功返回</p>

</div><div id="wmd-preview-section-59" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs json">{<br>    "<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">0</span></span>,<br>    "<span class="hljs-attribute">data</span>": <span class="hljs-value"><span class="hljs-string">"888b"</span></span>,<br>    "<span class="hljs-attribute">status</span>":   <span class="hljs-value"><span class="hljs-number">0</span><br></span>}<br></code></pre>

</div><div id="wmd-preview-section-60" class="wmd-preview-section preview-content">

<h4 id="获取用户对战信息">获取用户对战信息</h4>

<p>1.目的 <br>
    用于获取 a,b,c extend0 extend1… <br>
2.配置 <br>
    无需配置 <br>
3.接口 <br>
Http:: getUserBattleInfo</p>

</div><div id="wmd-preview-section-61" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs dns">http://testopen.matchvs.com/wc5/getUserBattleInfo.do?userID=34437&amp;gameID=100011&amp;sign=<span class="hljs-number">0193f78f80</span><span class="hljs-number">7001e664</span>d597826cacc493 <br></code></pre>

<p>返回:</p>

</div><div id="wmd-preview-section-62" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs cpp">{<br>data: <br>{<br>escapeTimes: <span class="hljs-number">0</span>,<br>overTimes: <span class="hljs-number">0</span>,<br>score: <br>{<br>    extend_0: <span class="hljs-number">0</span>,<br>    extend_1: <span class="hljs-number">0</span>,<br>    extend_2: <span class="hljs-number">0</span>,<br>    extend_3: <span class="hljs-number">0</span>,<br>    extend_4: <span class="hljs-number">0</span>,<br>    extend_5: <span class="hljs-number">0</span>,<br>    extend_6: <span class="hljs-number">0</span>,<br>    extend_7: <span class="hljs-number">0</span>,<br>    extend_8: <span class="hljs-number">0</span>,<br>    extend_9: <span class="hljs-number">0</span>,<br>    scoreA: <span class="hljs-number">0</span>,<br>    scoreB: <span class="hljs-number">0</span>,<br>    scoreC: <span class="hljs-number">0</span><br>},<br>userinfo: <br>{<br>    avatar: <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997025346.jpg"</span>,<br>    nickname: <span class="hljs-string">"仍秀杰"</span>,<br>    userID: <span class="hljs-string">"34437"</span><br>}<br>},<br>status: <span class="hljs-number">0</span><br>}<br></code></pre>

</div><div id="wmd-preview-section-63" class="wmd-preview-section preview-content">

<h4 id="排行榜">排行榜</h4>

<p>用户的排名 <br>
1.目的 <br>
    用于获取 a,b,c extend0 extend1…的排行榜中用户的排位 <br>
2.配置 <br>
    配置字段的排名规则,如升序,降序 <br>
3.接口 <br>
Http::getUserRank.do</p>

</div><div id="wmd-preview-section-64" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs livecodeserver"><span class="hljs-keyword">http</span>://testopen.matchvs.com/wc4/getUserRank.<span class="hljs-built_in">do</span>?gameID=<span class="hljs-number">102000</span>&amp;<span class="hljs-keyword">item</span>=extend_1&amp;userID=<span class="hljs-number">32</span>&amp;<span class="hljs-keyword">token</span>=HLAYXDDYGAQYELLWEOVULVPSIIWZVSWL<br></code></pre>

<p>接口参数：</p>

<table>
<thead>
<tr>
  <th>参数</th>
  <th>说明</th>
</tr>
</thead>
<tbody><tr>
  <td>gameID</td>
  <td>游戏ID(创建游戏时获得)</td>
</tr>
<tr>
  <td>item</td>
  <td>排行字段(后台配置时指定)</td>
</tr>
<tr>
  <td>userID</td>
  <td>用户ID(登录获得)</td>
</tr>
<tr>
  <td>token</td>
  <td>用户Token(登录获得)</td>
</tr>
</tbody></table>


</div><div id="wmd-preview-section-65" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs cpp">{<br>    <span class="hljs-string">"data"</span>: {<br>        <span class="hljs-string">"gameID"</span>:   <span class="hljs-string">"102000"</span>,<br>        <span class="hljs-string">"item"</span>: <span class="hljs-string">"extend_1"</span>,<br>        <span class="hljs-string">"rank"</span>: <span class="hljs-number">1</span>,<br>        <span class="hljs-string">"ruleA"</span>:    <span class="hljs-string">"desc"</span>,<br>        <span class="hljs-string">"type"</span>: <span class="hljs-number">1</span>,<br>        <span class="hljs-string">"userID"</span>:   <span class="hljs-string">"32"</span><br>    },<br>    <span class="hljs-string">"status"</span>:   <span class="hljs-number">0</span><br>}'<br></code></pre>

<p>返回结果：</p>

<table>
<thead>
<tr>
  <th>参数</th>
  <th>说明</th>
</tr>
</thead>
<tbody><tr>
  <td>gameID</td>
  <td>游戏ID(创建游戏时获得)</td>
</tr>
<tr>
  <td>item</td>
  <td>排行字段(后台配置时指定)</td>
</tr>
<tr>
  <td>userID</td>
  <td>用户ID(登录获得)</td>
</tr>
<tr>
  <td>rank</td>
  <td>名次</td>
</tr>
<tr>
  <td>ruleA</td>
  <td>desc/asc</td>
</tr>
<tr>
  <td>type</td>
  <td>0：每日排行    1：历史排行</td>
</tr>
</tbody></table>


<p>全体排名 <br>
获取某个字段的全体排名 <br>
1.目的 <br>
    用于获取 a,b,c extend0 extend1…获取某个字段的全体排名 <br>
2.配置 <br>
    配置字段的排名规则,如升序,降序 <br>
3.接口 <br>
Http::getItemRank</p>

<table>
<thead>
<tr>
  <th>参数</th>
  <th>说明</th>
</tr>
</thead>
<tbody><tr>
  <td>gameID</td>
  <td>游戏ID(创建游戏时获得)</td>
</tr>
<tr>
  <td>item</td>
  <td>排行字段</td>
</tr>
<tr>
  <td>top</td>
  <td>前N名（可选填）</td>
</tr>
</tbody></table>


<p>返回结果：</p>

<table>
<thead>
<tr>
  <th>参数</th>
  <th>说明</th>
</tr>
</thead>
<tbody><tr>
  <td>gameID</td>
  <td>游戏ID(创建游戏时获得)</td>
</tr>
<tr>
  <td>result</td>
  <td>用户的排名及其用户信息</td>
</tr>
<tr>
  <td>item</td>
  <td>排行字段</td>
</tr>
<tr>
  <td>nums</td>
  <td>排名总数量</td>
</tr>
<tr>
  <td>ruleA</td>
  <td>desc/asc</td>
</tr>
<tr>
  <td>type</td>
  <td>0：每日排行    1：历史排行</td>
</tr>
</tbody></table>


<p>示例:</p>

</div><div id="wmd-preview-section-66" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs livecodeserver"><span class="hljs-keyword">http</span>://testopen.matchvs.com/wc4/getItemRank.<span class="hljs-built_in">do</span>?gameID=<span class="hljs-number">102000</span>&amp;<span class="hljs-keyword">item</span>=extend_1&amp;top=<span class="hljs-number">10</span><br></code></pre>

<p>返回:</p>

</div><div id="wmd-preview-section-67" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs cpp">{<br>    <span class="hljs-string">"data"</span>: {<br>        <span class="hljs-string">"gameID"</span>:   <span class="hljs-string">"102000"</span>,<br>        <span class="hljs-string">"item"</span>: <span class="hljs-string">"extend_1"</span>,<br>        <span class="hljs-string">"nums"</span>: <span class="hljs-number">10</span>,<br>        <span class="hljs-string">"result"</span>:   [{<br>                <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997282747.jpg"</span>,<br>                <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"南区第一帅"</span>,<br>                <span class="hljs-string">"rank"</span>: <span class="hljs-number">1</span>,<br>                <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"32"</span>,<br>                <span class="hljs-string">"value"</span>:    <span class="hljs-number">456</span><br>            }, {<br>                <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997342935.jpg"</span>,<br>                <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"南区第一帅"</span>,<br>                <span class="hljs-string">"rank"</span>: <span class="hljs-number">2</span>,<br>                <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"31"</span>,<br>                <span class="hljs-string">"value"</span>:    <span class="hljs-number">455</span><br>            }, {<br>                <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997090890.jpg"</span>,<br>                <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"登卓君"</span>,<br>                <span class="hljs-string">"rank"</span>: <span class="hljs-number">3</span>,<br>                <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"36785"</span>,<br>                <span class="hljs-string">"value"</span>:    <span class="hljs-number">2</span><br>            }, {<br>                <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997025346.jpg"</span>,<br>                <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"刀凝蕊"</span>,<br>                <span class="hljs-string">"rank"</span>: <span class="hljs-number">4</span>,<br>                <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"39782"</span>,<br>                <span class="hljs-string">"value"</span>:    <span class="hljs-number">2</span><br>            }, {<br>                <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997282747.jpg"</span>,<br>                <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"旷华月"</span>,<br>                <span class="hljs-string">"rank"</span>: <span class="hljs-number">5</span>,<br>                <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"39784"</span>,<br>                <span class="hljs-string">"value"</span>:    <span class="hljs-number">2</span><br>            }, {<br>                <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997330299.jpg"</span>,<br>                <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"员骏燕"</span>,<br>                <span class="hljs-string">"rank"</span>: <span class="hljs-number">6</span>,<br>                <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"39785"</span>,<br>                <span class="hljs-string">"value"</span>:    <span class="hljs-number">2</span><br>            }, {<br>                <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997330299.jpg"</span>,<br>                <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"华旭辉"</span>,<br>                <span class="hljs-string">"rank"</span>: <span class="hljs-number">7</span>,<br>                <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"39814"</span>,<br>                <span class="hljs-string">"value"</span>:    <span class="hljs-number">0</span><br>            }, {<br>                <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997025346.jpg"</span>,<br>                <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"南区第一帅"</span>,<br>                <span class="hljs-string">"rank"</span>: <span class="hljs-number">8</span>,<br>                <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"23"</span>,<br>                <span class="hljs-string">"value"</span>:    <span class="hljs-number">0</span><br>            }, {<br>                <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997342935.jpg"</span>,<br>                <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"游客nqabI0He"</span>,<br>                <span class="hljs-string">"rank"</span>: <span class="hljs-number">9</span>,<br>                <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"37529"</span>,<br>                <span class="hljs-string">"value"</span>:    <span class="hljs-number">0</span><br>            }, {<br>                <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997025346.jpg"</span>,<br>                <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"游客8CZjlX5d"</span>,<br>                <span class="hljs-string">"rank"</span>: <span class="hljs-number">10</span>,<br>                <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"37664"</span>,<br>                <span class="hljs-string">"value"</span>:    <span class="hljs-number">0</span><br>            }],<br>        <span class="hljs-string">"ruleA"</span>:    <span class="hljs-string">"desc"</span>,<br>        <span class="hljs-string">"type"</span>: <span class="hljs-number">1</span><br>    },<br>    <span class="hljs-string">"status"</span>:   <span class="hljs-number">0</span><br>}'<br></code></pre>

</div><div id="wmd-preview-section-68" class="wmd-preview-section preview-content">

<h4 id="签到">签到</h4>

<p>签到,登录奖励 <br>
1.目的 <br>
    按时间段给用户发放物品 <br>
2.配置 <br>
    配置奖励的商品(后台配置),时间段等. <br>
3.接口 <br>
Http::loginSubsidy</p>

<table>
<thead>
<tr>
  <th>参数</th>
  <th>说明</th>
</tr>
</thead>
<tbody><tr>
  <td>gameID</td>
  <td>游戏ID(创建游戏时获得)</td>
</tr>
<tr>
  <td>appkey</td>
  <td>后台创建游戏时得到</td>
</tr>
<tr>
  <td>userID</td>
  <td>用户ID(登录获得)</td>
</tr>
<tr>
  <td>token</td>
  <td>用户Token(登录获得)</td>
</tr>
</tbody></table>


<p>返回参数</p>

<table>
<thead>
<tr>
  <th>参数</th>
  <th>说明</th>
</tr>
</thead>
<tbody><tr>
  <td>gameID</td>
  <td></td>
</tr>
<tr>
  <td>productID</td>
  <td></td>
</tr>
<tr>
  <td>type</td>
  <td>商品的类型</td>
</tr>
<tr>
  <td>count</td>
  <td>商品的数据量</td>
</tr>
<tr>
  <td>year</td>
  <td>年（subsidytype为0是才有效）</td>
</tr>
<tr>
  <td>month</td>
  <td>月（subsidytype为0是才有效）</td>
</tr>
<tr>
  <td>day</td>
  <td>日（subsidytype为0是才有效）</td>
</tr>
<tr>
  <td>runningdays</td>
  <td>subsidytype为1表示连续天数，subsidytype为2表示周签到次数</td>
</tr>
<tr>
  <td>subsidytype</td>
  <td>奖励方式类型 0:日期奖励 1:连续N天奖励 2:周循环 3:首次登陆奖励</td>
</tr>
</tbody></table>


</div><div id="wmd-preview-section-69" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs dns">http://testpay.matchvs.com/wc4/signSubsidy.do?gameID=102000&amp;userID=32&amp;sign=c9142bcabc<span class="hljs-number">48628b06</span>dba<span class="hljs-number">444532c7</span>e7f<br></code></pre>

</div><div id="wmd-preview-section-70" class="wmd-preview-section preview-content">

<h4 id="任务成就奖励奖品发放">任务成就奖励,奖品发放.</h4>

<p>直接奖励(每个用户只能领取一次)</p>

<p>配置示例:</p>

</div><div id="wmd-preview-section-71" class="wmd-preview-section preview-content">

<p><img longdesc="./1468838769261.png" alt="Alt text" title="" type="image/png" src="" class=""></p>

<p>接口:</p>

</div><div id="wmd-preview-section-72" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs dns">http://testpay.matchvs.com/wc4/award.do?awardID=1&amp;gameID=102000&amp;userID=32&amp;sign=<span class="hljs-number">49701939b38</span><span class="hljs-number">3494157319</span>c62a3bc7510<br></code></pre>

<p>成功返回:</p>

<table>
<thead>
<tr>
  <th>参数</th>
  <th>意义</th>
</tr>
</thead>
<tbody><tr>
  <td>productID</td>
  <td>商品ID</td>
</tr>
<tr>
  <td>count</td>
  <td>个数</td>
</tr>
</tbody></table>


<p>失败返回:</p>

</div><div id="wmd-preview-section-73" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs json">{<br>    "<span class="hljs-attribute">code</span>": <span class="hljs-value"><span class="hljs-number">200</span></span>,<br>    "<span class="hljs-attribute">msg</span>":  <span class="hljs-value"><span class="hljs-string">"领取次数已经达到上限"</span></span>,<br>    "<span class="hljs-attribute">status</span>":   <span class="hljs-value"><span class="hljs-number">1</span><br></span>}<br><br></code></pre>

</div><div id="wmd-preview-section-74" class="wmd-preview-section preview-content">

<h4 id="批量获取用户信息">批量获取用户信息</h4>

<p>根据id批量获取用户信息</p>

<table>
<thead>
<tr>
  <th>参数</th>
  <th>说明</th>
</tr>
</thead>
<tbody><tr>
  <td>userIDList</td>
  <td>用户ID,多个则用,号隔开)</td>
</tr>
</tbody></table>


<p>接口:</p>

</div><div id="wmd-preview-section-75" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs elixir"><span class="hljs-symbol">http:</span>/<span class="hljs-regexp">/testuser.matchvs.com/wc</span>3/getUserInfoX.<span class="hljs-keyword">do</span>?userIDList=<span class="hljs-number">23</span>,<span class="hljs-number">32</span><br></code></pre>

<p>返回:</p>

</div><div id="wmd-preview-section-76" class="wmd-preview-section preview-content">

<pre class="prettyprint hljs-dark"><code class="hljs xquery">{<br>    <span class="hljs-string">"data"</span>: [{<br>            <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997025346.jpg"</span>,<br>            <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"南区第一帅"</span>,<br>            <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"23"</span><br>        }, {<br>            <span class="hljs-string">"headimgurl"</span>:   <span class="hljs-string">"http://pic.vszone.cn/upload/head/1416997282747.jpg"</span>,<br>            <span class="hljs-string">"nickname"</span>: <span class="hljs-string">"南区第一帅"</span>,<br>            <span class="hljs-string">"userid"</span>:   <span class="hljs-string">"32"</span><br>        }],<br>    <span class="hljs-string">"status"</span>:   <span class="hljs-number">0</span><br>}<span class="hljs-string">'<br></span><br></code></pre></div><div id="wmd-preview-section-footnotes" class="preview-content"></div></div></body></html>